package org.stvd.entities.admin;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;
import org.stvd.entities.base.BaseEntity;

/**
 * 系统资源-实体类
 * @author houzx
 */
@Entity
@Table(name="resources")
public class Resources extends BaseEntity{
    private static final long serialVersionUID = -2635704814675956839L;
    
    /**
     * 资源ID
     */
    @Id
    @Column(name="res_id",nullable=false)
    private String resId = "";
    
    /**
     * 资源类型
     */
    @Column(name="type",nullable=false)
    private String type = "";
    
    /**
     * 资源名称
     */
    @Column(name="name",nullable=false)
    @NotEmpty(message="资源名称不能为空！")
    private String name = "";
    
    /**
     * 资源内容
     */
    @Column(name="content",nullable=false)
    @NotEmpty(message="资源内容不能为空！")
    private String content = "";
    
    /**
     * 优先级
     */
    @Column(name="priority",nullable=false)
    @NotNull(message="优先级不能为空！")
    @Min(message="优先级请输入1~9999的整数！", value = 1)
    @Max(message="优先级请输入1~9999的整数！", value = 9999)
    private Integer priority=0;
    
    /**
     * 描述
     */
    @Column(name="memo", nullable=false)
    private String memo = "";
    
    /**
     * 平台GUID
     */
    @Column(name="guid", nullable=false)
    private String guid = "";
    

	public String getResId() {
		return resId;
	}

	public void setResId(String resId) {
		this.resId = resId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}
	
}
